// This code is based on a pdf guide from an Arduino Learning kit from elegoo // This can be purchased from https://www.amazon.in/Elegoo-EL-KIT-003-Project-Starter-Tutorial/dp/B01D8KOZF4 int ledPin = 8; int buttonApin = 7; int buttonBpin = 2; byte leds = 0; void setup() { pinMode(ledPin, OUTPUT); pinMode(buttonApin, INPUT); pinMode(buttonBpin, INPUT); } void loop() { if (digitalRead(buttonApin) == LOW) { digitalWrite(8, HIGH); // turn the LED on (HIGH is the voltage level) delay(500); // wait for a second digitalWrite(8, LOW); // turn the LED off by making the voltage LOW delay(500); // wait for a second } else if (digitalRead(buttonBpin) == LOW) { digitalWrite(8, HIGH); // turn the LED on (HIGH is the voltage level) delay(5000); // wait for a second digitalWrite(8, LOW); // turn the LED off by making the voltage LOW delay(5000); // wait for a second } else { digitalWrite(8, HIGH); // turn the LED on (HIGH is the voltage level) delay(50); // wait for a second digitalWrite(8, LOW); // turn the LED off by making the voltage LOW delay(50); // wait for a second } }